import request from "@/utils/request";
// 查询参数列表
export function listShop(query) {
  return request({
    url: "/system/shop/list",
    method: "get",
    params: query,
  });
}

// 查询商品详细
export function getShop(shopId) {
  return request({
    url: "/system/shop/" + shopId,
    method: "get",
  });
}

export function addShop(data) {
  return request({
    url: "/system/shop",
    method: "post",
    data: data,
  });
}

// 修改商品
export function updateShop(data) {
  return request({
    url: "/system/shop",
    method: "put",
    data: data,
  });
}

// 删除商品
export function delShop(ids) {
  return request({
    url: "/system/shop/remove",
    method: "post",
    params: {
      ids: ids,
    },
  });
}

// 角色状态修改
export function changeShopStatus(shopId, status) {
  const data = {
    shopId,
    status,
  };
  return request({
    url: "/system/shop/changeStatus",
    method: "put",
    data: data,
  });
}
